package com.mt.roll.wms.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.roll.core.base.BaseService;
import com.mt.roll.core.vo.PageVo;
import com.mt.roll.core.vo.R;
import com.mt.roll.wms.mapper.WcsToWmsVoMapper;
import com.mt.roll.wms.params.WcsToWmsQueryParam;
import com.mt.roll.wms.service.WcsToWmsService;
import com.mt.roll.wms.vo.StorageBoxCircInfoVo;
import com.mt.roll.wms.vo.WcsToWmsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class WcsToWmsServiceImpl extends BaseService implements WcsToWmsService {

    @Autowired
    private WcsToWmsVoMapper wcsToWmsVoMapper;

    @Override
    public R<PageVo<WcsToWmsVo>> page(WcsToWmsQueryParam wcsToWmsQueryParam) {
        IPage<WcsToWmsVo> wcsToWmsVoIPage = new Page<>(wcsToWmsQueryParam.getCurrent(),wcsToWmsQueryParam.getSize());
        IPage<WcsToWmsVo> page = wcsToWmsVoMapper.page(wcsToWmsVoIPage, wcsToWmsQueryParam);
        return successful(new PageVo<>(page,WcsToWmsVo.class));
    }
}
